package com.libbase.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import com.base.activity.BaseActivity;
import com.libbase.R;
import com.uitls.utils.AnimationsContainer;

import butterknife.BindView;
import butterknife.ButterKnife;

public class AnimationActivity extends BaseActivity {

    public static void startActivity(Context context) {
        Intent intent = new Intent(context, AnimationActivity.class);
        context.startActivity(intent);
    }

    @BindView(R.id.iv_anim)
    ImageView ivAnim;

    AnimationsContainer.FramesSequenceAnimation animation;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_anim;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        ButterKnife.bind(this);
        animation = new AnimationsContainer().createAnim(ivAnim, AnimationsContainer.getRes(mContext, R.array.bus_in), 150).start();
    }

    @Override
    protected void release() {
        animation.stop();
    }


}
